package com.sqm.sync_tool.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 用户_组织架构关联表
 * </p>
 *
 * @author sxubo
 * @since 2020-10-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_organization_relation")
public class UserOrganizationRelation extends Model<UserOrganizationRelation> {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "user_organization_id", type = IdType.AUTO)
    private Integer userOrganizationId;

    /**
     * 用户Id
     */
    @TableField("user_id")
    private String userId;

    /**
     * 所属组织ID
     */
    @TableField("organization_chart_id")
    private String organizationChartId;

    /**
     * 是否为负责人(1:是 ，-1：否)
     */
    @TableField("type")
    private Integer type;


    @Override
    protected Serializable pkVal() {
        return this.userOrganizationId;
    }

}
